<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>¡Ten ser mnie pali!</title>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= stylesheet_link_tag 'site' %>
  <%= javascript_include_tag :defaults %>
  <%= javascript_include_tag "znikacz" %>
  
</head>
<body>
<div id="all">
<div id="logo"><%= image_tag '/images/logo2.png', :alt => 'logo' %></div>
<div id="nav">
		
		<span class="lnk"><%= link_to_unless_current "Strona główna", :action => "index", :controller => "site" %></span>
		<span class="lnk"><%= link_to_unless_current "Użytkownicy", :action => "users", :controller => "site" %></span>
		<span class="lnk"><%= link_to_unless_current "O serwisie", :action => "about", :controller => "site" %></span>
		<% if session[:user_id] -%>
			<span class="lnk"><%= link_to_unless_current 'Twoja galeria', :action => "gallery", :controller => "site", :id => session[:user_id], :page => 1 %></span>
			<span class="lnk"><%= link_to_unless_current 'Profil', :action => "profile", :controller => "site", :id => session[:user_id] %></span>
			<span class="lnk"><%= link_to_unless_current 'Upload', :action => "upload", :controller => "picture" %></span>
			<span class="lnk"><%= link_to_unless_current 'Wyloguj', :action => "logout", :controller => "site" %></span>
			<% if User.admin?(session[:user_id]) -%>
				<span class="lnk"><%= link_to_unless_current 'Admin', :action => "index", :controller => "users" %></span>
			<% end %>
		<% else -%>
			<span class="lnk"><%= link_to_unless_current 'Rejestracja', :action => "register", :controller => "site" %></span>
			<span class="lnk"><%= link_to_unless_current 'Logowanie', :action => "login", :controller => "site" %></span>
		<% end -%>
		

</div>

<div id="main">
	<% if flash[:notice] -%>
		<div id="notice"><%= flash[:notice] %></div>
	<% end -%>
	
	<%= yield  %>
</div>
	<% if ENV["RAILS_ENV"] == "development" %>
		<div id="debug">
			<a href="#" onclick="Element.toggle('params_debug_info');return false">
			params</a> |
			<a href="#" onclick="Element.toggle('session_debug_info');return false">
			session</a>
			<fieldset id="params_debug_info" class="debug_info" style="display:none">
				<legend>params</legend>
				<%= debug(params) %>
			</fieldset>
			<fieldset id="session_debug_info" class="debug_info" style="display:none">
				<legend>session</legend>
				<%= debug(session) %>
			</fieldset>
		</div>
	<% end %>
</div>

<div id="footer">
© 2008-2009 Tomasz Kalinowski, Wojciech Kusz, Karol Łopaciński et Adam Stenka. Wszelkie prawa zastrzeżone. Na wieki wieków amen.
</div>

</body>
</html>
